#include<bits/stdc++.h>

using namespace std;
using ll = long long;
#define endl '\n'

template<typename T=int>
inline T read() {
    T x;
    cin >> x;
    return x;
}

void quick_sort(int *a, int left, int right) {
    if (left >= right)return;
    int pivot = a[left], j = right, i = left;
    while (i != j) {
        while (i < j && a[j] >= pivot)j--;
        while (i < j && a[i] <= pivot)i++;
        if (i >= j)break;
        swap(a[i], a[j]);
    }
    swap(a[left], a[i]);
    quick_sort(a, left, i - 1);
    quick_sort(a, i + 1, right);
}

int a[100000];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int n = read();
    for (int i = 0; i < n; i++)cin >> a[i];
    quick_sort(a, 0, n - 1);
    copy(a, a + n, ostream_iterator<int>(cout, " "));
    cout << endl;
    return 0;
}